﻿using Xejen.Communication.Configuration;
using Xejen.Communication.Socket.Configuration;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Text;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;

namespace Xejen.Communication.Socket.Abstract
{
    /// <summary>
    /// 表示Socket请求提供器
    /// </summary>
    /// <creator>marc</creator>
    public interface ISocketInvoker : IDisposable
    {
        /// <summary>
        /// 发送socket请求
        /// </summary>
        /// <param name="input">待发送的数据字节</param>
        /// <param name="timeout">超时时间，单位：毫秒</param>
        /// <param name="cancellationToken">是否取消的令牌</param>
        /// <returns></returns>
        Task<SocketResponse> SendAsync(byte[] input, int timeout = -1, CancellationToken cancellationToken = default);
    }
}
